<template>
  <div>
    <div class="input-box">
      username:
      <my-input ref="username" type="text" placeholder="username" nodel="132"></my-input>
    </div>
    <div class="input-box">
      password:
      <my-input ref="password" type="password" placeholder="password"></my-input>
    </div>
    <div class="input-box">
      <my-button type="success" @click="loginAction">login</my-button>
    </div>
  </div>
</template>

<script>
import MyInput from "./MyInput.vue";
import MyButton from "./MyButton.vue";
export default {
  name: "DomeIndex",
  components: {MyButton,MyInput},
  data() {
    return {};
  },

  mounted() {},

  methods: {
    loginAction() {
        const username=this.$refs.username.value;
        const password=this.$refs.password.value
      console.log(username);
      console.log(password);
      this.$refs.username.resetInput();
      this.$refs.password.resetInput();
    },
  },
};
</script>

<style lang="scss" scoped>
</style>